1. Field of the Invention
The present invention relates to a method and apparatus for processing an image, and more particularly, to a method and apparatus for improving the result of segmenting an image into a plurality of regions and discriminately determining the extent of processing each of the regions.
2. Description of the Related Art
Much attention has been paid to research into the field of segmentation related digital video signal processing. New technology has been continuously applied for efficient analysis and representation of this field. Today, the field of segmentation is indispensable to the field of multimedia application.
Various fields of application for video signal segmentation have been introduced, and the result of segmentation can be effectively applied to image quality processing, moving picture coding, object recognition, and so on.
In particular, in the field of image quality processing, if the foreground (hereinafter referred to as “FG”) and background (hereinafter referred to as “BG”) of a moving picture can be separated from each other, it is possible to give a three-dimensional (3D)/realistic effect to the moving picture by discriminately processing the FG and the BG. Here, the FG includes major parts of a scene, such as main characters and objects of the scene, and the BG includes minor parts of the scene, such as a mountain, trees, etc.
If an image is obtained by segmenting the image into an interest region (which includes a FG) and a non-interest region (which includes a BG), and performing binary discriminative processing on the interest region and the non-interest region, excessive degradation of image quality occurs around the border of the processed regions, e.g. the border between the FG and the BG.
FIG. 1 illustrates a conventional, filter-based smoothing method. Referring to FIG. 1, binary processing is performed on a FG region and a BG region (see the left drawing of FIG. 1), but in the filter-based smoothing method, the extent of processing is discriminatively applied to the FG region and the BG region in order to continuously and gradually reduce the extent of processing over the border therebetween, so that the inclination of the graph is smoothly curved around the border (see the right drawing of FIG. 1).
The filter-based smoothing method may be performed by applying various smoothing filters, such as a linear filter or a Gaussian filter, to the regions of a segmented image. This method is easy to perform, but basically causes over-smoothing, which degrades the image quality, and cannot compensate for a border between the regions.
FIG. 2 is a diagram illustrating a conventional, tri-map based matting method.
In the matting method, a FG color, BG color, and opacity are precisely estimated and recovered from pixels around the borders of a FG, a BG and an unknown region of a tri-map received from a user, and the recovered FG-color image is naturally combined with another received image. However, this method has the disadvantage that it can be applied only to images having a simple BG and whose FG color and BG color are significantly distinguished from each other, and its performance is determined by the precision of an input tri-map.